<?php


/**
 * Class for Password Validation
 *
 * @category   Zend
 * @uses       Zend_Validate_Abstract
 * @subpackage Zend_Validate
 * @copyright  Copyright (c) 2009 East Hui Van Business Consulting Co., Ltd. (http://www.easthv.com)
 */
class Zend_Validate_NotOnlyNumber extends Zend_Validate_Abstract
{
    /**
     * Validation failure message key
     */
	const ONLY_NUMBER = 'onlyNumber';


    /**
     * Validation failure message template definitions
     *
     * @var array
     */
    protected $_messageTemplates = array(
        self::ONLY_NUMBER    => "only number is not allow",
	);

    /** 
     * Defined by Zend_Validate_Interface 
     * 
     * Returns true if and only if the input password is same as confirm password
     * 
	 * @param string $value
	 *
     * @return boolean 
     */ 
    public function isValid($value)
	{

        $this->_setValue($value);
		if(is_numeric($value)) {
            $this->_error(self::ONLY_NUMBER);
            return false;		
		}
        return true;
    }

}
